home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / misc / math / MathFX_src.lha / fxbeg.c < prev    next >
C/C++ Source or Header  |  1995-12-20  |  735b  |  35 lines

  1. /* Sets up the device "dev" for plotting, dividing the page into "nx" */
  2. /* by "ny" subpages. */
  3.  
  4. #include "mathfx.h"
  5. #include <math.h>
  6.  
  7.  
  8.  
  9. void fxbeg(dev,nx,ny)      
  10. int dev, nx, ny;
  11. {
  12.       float scale, def, ht;
  13.  
  14.       if ((nx <= 0) || (ny <= 0 )) 
  15.          fatal("Cannot have negative number of subpages in FXSTAR");
  16.  
  17.       scale = 1.0/sqrt((double)ny);
  18.       grbeg(dev); 
  19.       ssub(nx,ny,0);
  20.  
  21.       /* Set up character, symbol and tick sizes for requested number of */
  22.       /* subpages */
  23.  
  24.       gchr(&def,&ht);
  25.       schr(def*scale,def*scale);
  26.       gsym(&def,&ht);
  27.       ssym(def*scale,def*scale);
  28.       gmaj(&def,&ht);
  29.       smaj(def*scale,def*scale);
  30.       gmin(&def,&ht);
  31.       smin(def*scale,def*scale);
  32.       slev(1);
  33. }
  34.  
  35.